# Copyright (C) Kumo inc. and its affiliates.
# Author: Jeff.li lijippy@163.com
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#


set(KJ_CORE
        common-test.cc
        memory-test.cc
        array-test.cc
        list-test.cc
        string-test.cc
        table-test.cc
        map-test.cc
        exception-test.cc
        # this test overrides symbolizer and has to be linked separately
        # exception-override-symbolizer-test.cc
        debug-test.cc
        io-test.cc
        mutex-test.cc
        time-test.cc
        threadlocal-test.cc
        test-test.cc
        iostream-test.cc
)
kmcmake_cc_test(
        NAME core_test
        MODULE kj
        SOURCES
        ${KJ_CORE}
        CXXOPTS ${KMCMAKE_CXX_OPTIONS}
        LINKS
        shark::shark_static
        shark::shark_test_static
        ${KMCMAKE_STATIC_BIN_OPTION}
        ${KMCMAKE_DEPS_LINK}
)

set(KJ_RPC
        async-test.cc
        async-xthread-test.cc
        async-coroutine-test.cc
        async-unix-test.cc
        async-unix-xthread-test.cc
        async-win32-test.cc
        async-win32-xthread-test.cc
        async-io-test.cc
        async-queue-test.cc
        refcount-test.cc
        string-tree-test.cc
        encoding-test.cc
        arena-test.cc
        units-test.cc
        tuple-test.cc
        one-of-test.cc
        function-test.cc
        filesystem-test.cc
        filesystem-disk-test.cc
        parser/common-test.cc
        parser/char-test.cc
        compact/url-test.cc
        compact/http-test.cc
        compact/gzip-test.cc
        compact/tls-test.cc
)
kmcmake_cc_test(
        NAME rpc_test
        MODULE kj
        SOURCES
        ${KJ_RPC}
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        shark::shark_test_static
        shark::shark_static
        ${KMCMAKE_DEPS_LINK}
)